﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace MyFeer.Lib.common
{
    public class IntegerPoint
    {
        private int x;

        private int y;

        
        public IntegerPoint(int x, int y)
        {
            this.x = x;
            this.y = y;
        }

        public int X
        {
            get { return x; }
            set { x = value; }
        }

        public int Y
        {
            get { return y; }
            set { y = value; }
        }

        public override int GetHashCode()
        {
            return x * 31 + y * 31;
        }
        public override bool Equals(object obj)
        {
            if (obj.GetType() ==typeof(IntegerPoint))
            {
                IntegerPoint cPos = (IntegerPoint)obj;
                if (cPos.X == this.X && cPos.Y == this.Y)
                    return true;
            }
            return false;
        }

    }
}
